package org.ant.gui.menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuBar;

public class AntMenuBar extends JMenuBar implements ActionListener{
	
	private JMenu fileMenu;
	private JMenu editMenu;
	private JMenu windowMenu;
	private JMenu hwMenu;
	private JMenu helpMenu;
	
	public AntMenuBar(){
		super();
		init();
		loadComponent();
	}
	
	protected void init(){
	}
	
	protected void loadComponent(){
		add(getFileMenu());
		add(getEditMenu());
		add(getWindowMenu());
		add(getHWMenu());
		add(getHelpMenu());
	}
	
	public JMenu getFileMenu() {
		if(fileMenu == null){
			fileMenu = new FileMenu();
		}
		return fileMenu;
	}

	public JMenu getEditMenu() {
		if(editMenu == null){
			editMenu = new EditMenu();
		}
		return editMenu;
	}

	public JMenu getWindowMenu() {
		if(windowMenu == null){
			windowMenu = new WindowMenu();
		}
		return windowMenu;
	}
	
	public JMenu getHWMenu() {
		if(hwMenu == null){
			hwMenu = new HWMenu();
		}
		return hwMenu;
	}
	
	public JMenu getHelpMenu() {
		if(helpMenu == null){
			helpMenu = new HelpMenu();
		}
		return helpMenu;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		
	}	
}
